package org.hry.netty.embedded;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.embedded.EmbeddedChannel;
import org.junit.jupiter.api.Test;

public class FixedLengthFrameDecoderTest {


    @Test
    public void a() {
        ByteBuf buf = Unpooled.buffer();
        for (int i = 0; i<9; i++) {
            buf.writeByte(i);
        }
        ByteBuf input = buf.duplicate();
        EmbeddedChannel channel = new EmbeddedChannel(new FixedLengthFrameDecoder(3));

        assert (channel.writeInbound(input.retain()));

    }

}
